home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 027a / qquery.zip / README.DOC < prev    next >
Text File  |  1991-08-01  |  46KB  |  947 lines

  1.  
  2.           For immediate release                           August 1, 1991
  3.           ---------------------
  4.            
  5.  
  6.                               - QQuery Version 2.10E -
  7.  
  8.  
  9.                                QQuery for FoxPro 2.0!
  10.  
  11.  
  12.           Elaborate query management system for FoxBASE+ and FoxPro has
  13.           been updated for FoxPro 2.0.  QQuery helps user create, store,
  14.           copy, edit, and replay logical expressions to use with existing
  15.           reports and/or processes.  Includes context sensitive on-line
  16.           help system.  Registered users ($10) receive source code and
  17.           unlimited runtime rights.
  18.  
  19.           The source code of QQuery has been restructured for ease of
  20.           reading and maintenance, correct RETURN usage, complete
  21.           elimination of all EXIT and LOOP statements, and compatibility
  22.           with FoxPro 2.0 as well as FoxBASE+ 2.10 and FoxPro 1.02. 
  23.           Release 2.10E does not change or add any QQuery features.  Minor
  24.           enhancements include improved error checking in the editor and
  25.           much improved default screen colors.
  26.  
  27.           QQuery is available in the Fox Software data library 6 in any of
  28.           the following configurations:
  29.  
  30.           QQFBAS.ZIP   (FoxBASE+ 2.10 compile QQUERY.FOX plus docs)
  31.           QQFPR1.ZIP   (FoxPro 1.02 compile   QQUERY.FXP plus docs)
  32.           QQFPR2.ZIP   (FoxPro 2.0 compile    QQUERY.APP plus docs)
  33.  
  34.           Each file is about 100k and requires PKUNZIP to unpack after
  35.           downloading.
  36.  
  37.  
  38.           Carlos Berguido
  39.           1722 Capella Court
  40.           Petaluma, CA 94954
  41.           (707) 762-9067
  42.  
  43.  
  44.           For immediate release                             May 19, 1990
  45.           ---------------------
  46.            
  47.  
  48.                               - QQuery Version 2.10D -
  49.  
  50.  
  51.                                   QQuery for FoxPro!
  52.  
  53.           Elaborate query management system for FoxBASE+ and now for
  54.           FoxPro!  Helps user create, store, and replay queries to use with
  55.           your reports and/or processes.  Includes context sensitive on-
  56.           line help system.  Registered users ($10) receive source code and
  57.           unlimited runtime rights.  
  58.  
  59.           Version 2.10D adds modifiable related file field names pop up
  60.           menus in both the FoxBASE+ and FoxPro versions.  QQuery for
  61.           FoxPro is comparable in appearance, navigation, and function with
  62.           QQuery for FoxBASE+ while taking advantage of FoxPro's 25 work
  63.           areas and 254 field data files.
  64.  
  65.           New features in version 2.10D:
  66.  
  67.           1.   Pop up menus are available at the touch of the left and
  68.                right arrow keys for the field names and sample data of ANY
  69.                OR ALL OTHER OPEN WORK AREAS.
  70.  
  71.           2.   User definable exclusion of Help, Error and any other files
  72.                you specify from the field names pop up menus.
  73.  
  74.           3.   For greater control over the contents of field names pop up
  75.                menus, a new utility program is supplied, QQDMEDIT.PRG, a
  76.                program for modifying any existing QQuery QDM memory file.
  77.  
  78.           4.   The left and right arrow keys now are used to either exit
  79.                pop up menus with the highlighted choice OR to scan parallel
  80.                pop up menus.
  81.  
  82.           5.   The same source code provided when you register may be used
  83.                to compile QQuery to run under either FoxBASE+ or FoxPro
  84.                versions 1.01 or later.
  85.  
  86.  
  87.  
  88.           Carlos Berguido
  89.           1722 Capella Court
  90.           Petaluma, CA 94954
  91.           (707) 762-9067
  92.  
  93.  
  94.           For immediate release                             March 23, 1990
  95.           ---------------------
  96.            
  97.                               - QQuery Version 2.10C -
  98.  
  99.           By popular demand, the following policies are established for
  100.           QQuery, the logical expression builder and query manager for IBM
  101.           FoxBASE+.  QQuery is a 3rd party shareware product available for
  102.           downloading in the library of the Fox Software forum on
  103.           Compuserve, GO FOXFORUM.
  104.            
  105.                1.   UNLIMITED RUNTIME.  A single registration fee licenses
  106.                     you to include the QQuery modules in any application
  107.                     you develop and to distribute any number of copies of
  108.                     these applications with no royalties whatsoever.
  109.            
  110.                2.   The registration fee has been reduced to $10 effective
  111.                     immediately.  You will receive one 5 1/4" diskette
  112.                     (360k format) containing the QQuery program for
  113.                     FoxBASE+, a README file, and source code.
  114.            
  115.                3.   SOURCE CODE optimized for FoxBASE+ supplied on disk
  116.                     when you register.  As a registered user, you are
  117.                     licensed to:
  118.  
  119.                     a.   Modify the code as desired to optimize QQuery for
  120.                          your applications.
  121.  
  122.                     b.   Modify and re-compile all or part of QQuery as
  123.                          desired to optimize QQuery to run under FoxPro
  124.                          and/or other platforms.
  125.  
  126.                     c.   Provide QQuery source code to your clients that
  127.                          require source code, as long as you provide a
  128.                          notice that use of QQuery other than from within
  129.                          your application requires registration.
  130.            
  131.                4.   Unconditional 30 day money back guarantee.
  132.            
  133.  
  134.           Release 2.10C does not change or add any QQuery features.  The
  135.           purpose of this release is to incorporate the new policies in the
  136.           source code and screen notices only.
  137.  
  138.  
  139.  
  140.           Carlos Berguido
  141.           1722 Capella Court
  142.           Petaluma, CA 94954
  143.           (707) 762-9067
  144.  
  145.  
  146.  
  147.           08/01/91                Q Q U E R Y (tm)                   Page i
  148.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.                                 - TABLE OF CONTENTS -
  157.  
  158.  
  159.  
  160.           QUERY MANAGEMENT FOR FoxBASE+ and FoxPro . . . . . . . . . .    1
  161.  
  162.           REGISTRATION NOTICE  . . . . . . . . . . . . . . . . . . . .    1
  163.  
  164.           FEATURES AND BENEFITS  . . . . . . . . . . . . . . . . . . .    2
  165.  
  166.           CAUTION: MULTI-USER  . . . . . . . . . . . . . . . . . . . .    4
  167.  
  168.           ONE OPEN DATA FILE WORK AREA NEEDED  . . . . . . . . . . . .    4
  169.  
  170.           QQUERY FILE DESCRIPTIONS . . . . . . . . . . . . . . . . . .    4
  171.  
  172.           HOW QQUERY CREATES AND USES FILES  . . . . . . . . . . . . .    5
  173.                QDB & QDX FILES: QUERY DATA FILES AND INDEXES . . . . .    5
  174.                QDM FILES: FIELD NAME POP UP MENUS  . . . . . . . . . .    6
  175.                MULTIPLE WORK AREA FIELD NAME POP UP MENUS  . . . . . .    6
  176.                EXCLUDING FILES FROM FIELD NAMES POP UP MENUS . . . . .    7
  177.  
  178.           CUSTOM FIELD NAMES POP UP MENUS  . . . . . . . . . . . . . .    8
  179.  
  180.           MEMORY REQUIREMENTS  . . . . . . . . . . . . . . . . . . . .    9
  181.  
  182.           QQUERY MEMORY VARIABLES  . . . . . . . . . . . . . . . . . .   10
  183.  
  184.           CHANGING SCREEN COLORS . . . . . . . . . . . . . . . . . . .   11
  185.  
  186.           PROCEDURE FILES  . . . . . . . . . . . . . . . . . . . . . .   13
  187.  
  188.           READ ONLY ACCESS . . . . . . . . . . . . . . . . . . . . . .   14
  189.  
  190.           NOTICE REGARDING QQUERY SOURCE CODE  . . . . . . . . . . . .   15
  191.  
  192.           INSTALLATION . . . . . . . . . . . . . . . . . . . . . . . .   16
  193.  
  194.           08/01/91                Q Q U E R Y (tm)                   Page 1
  195.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  196.  
  197.  
  198.                       QUERY MANAGEMENT FOR FoxBASE+ and FoxPro
  199.  
  200.           QQuery was developed using the database language and extensions
  201.           known as FoxBASE+ and FoxPro from FOX SOFTWARE, INC. of
  202.           Perrysburg, Ohio.  QQuery was created by a 3rd party, independent
  203.           developer who is not affiliated with FOX SOFTWARE, INC.  FOX
  204.           SOFTWARE, INC. is not responsible for products that are developed
  205.           using their language products.  If you need help or information
  206.           regarding QQuery, please direct your inquiry to the author and
  207.           copyright holder of QQuery whose name appears below.
  208.  
  209.                               REGISTRATION NOTICE
  210.  
  211.             QQuery is not public domain or free software.  If you
  212.             continue using QQuery after a 30 day trial period, you
  213.             must register for a license to use QQuery.  A single
  214.             registration gives you royalty free unlimited runtime
  215.             rights for applications you develop that use QQuery.
  216.  
  217.             To register, send $10 (Ten dollars U.S.) directly to the
  218.             author:   (30 day unconditional money back guarantee)
  219.  
  220.                  Carlos Berguido         Telephone:
  221.                  1722 Capella Court      (707) 762-9067
  222.                  Petaluma, CA 94954
  223.  
  224.             Please include your name, address, and QQuery version
  225.             number.  You will receive the latest version of QQuery
  226.             INCLUDING ALL SOURCE CODE on a 5 1/4 inch diskette.
  227.  
  228.  
  229.           The source code is designed to make navigating QQuery as
  230.           comparable as possible whether it is run under FoxPro or FoxBASE+
  231.           except that the Enter key may also be used to exit the query
  232.           Browse when running under FoxPro only.
  233.  
  234.           If you have not installed QQuery, please read the last page of
  235.           this document regarding QQuery installation.
  236.  
  237.           The context sensitive Help system in the QQuery program is
  238.           intended to provide step by step instruction in the operation of
  239.           QQuery.  In addition, you are urged to experiment and seek other
  240.           sources of information in the science and art of creating and
  241.           combining logical expressions.
  242.  
  243.           FoxBASE+ and FoxPro are registered trademarks of FOX SOFTWARE,
  244.           INC.
  245.           08/01/91                Q Q U E R Y (tm)                   Page 2
  246.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  247.  
  248.                               - FEATURES AND BENEFITS -
  249.  
  250.           The information contained in this document is provided for system
  251.           developers and anyone interested in some of the technical ins and
  252.           outs of QQuery.
  253.  
  254.           FEATURE             BENEFIT
  255.  
  256.           Stores queries in   - Allows quick access to repeatedly used
  257.           a database.           queries.
  258.                               - Allows query creation and auditing by one
  259.                                 group and use by others.
  260.  
  261.           Each query has a    - Systemizes report headings.
  262.           name and a          - Makes it easy to locate and reuse queries.
  263.           description of up
  264.           to 55 characters.
  265.  
  266.           More than just SET  - QQuery will SET FILTER up to the 160
  267.           FILTER.               character limit on filter expressions. 
  268.                                 After exiting, the user can simply issue
  269.                                 commands and only those records that meet
  270.                                 the query condition will be included.
  271.                               - Also, at any time after exit with a query,
  272.                                 the user has access to memory variables for
  273.                                 the query name, description, and the up to
  274.                                 240 character condition itself for use in a
  275.                                 FOR phrase in commands such as COPY, INDEX,
  276.                                 LIST, and REPORT.
  277.                               - Program developers can call the QQuery
  278.                                 procedure from inside their procedure files
  279.                                 and take appropriate action in their
  280.                                 programs depending on what is returned is
  281.                                 the memory variables on QQuery's return.
  282.  
  283.           QQuery editor       - Allows flexibility in the way queries such
  284.           allows multiple       as "Guests who stay for 10 days or more"
  285.           field names and/or    are stated:
  286.           functions on both     DATEOUT-DATEIN is after or matches 10
  287.           sides of each         as well as:
  288.           equation.             DATEOUT is after or matches DATEIN+10
  289.  
  290.           QQuery editor uses  - User can see what options are available for
  291.           pop-up menus.         field names, functions, operators, nesting
  292.                                 parenthesis, and connectors.
  293.                               - Saves hundreds of keystrokes, saves time,
  294.                                 avoids misspellings.
  295.  
  296.           08/01/91                Q Q U E R Y (tm)                   Page 3
  297.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  298.  
  299.           FEATURE             BENEFIT
  300.  
  301.           Contains many of    - User can easily make a query insensitive to
  302.           the most popular      UPPER/lower case by choosing UPPER from a
  303.           functions on pop      pop-up menu: UPPER(CITY)='PERRYSBURG"
  304.           up menus.           - Make a query that ignores the last four
  305.                                 digits of a 9 digit zip code and enter
  306.                                 multiple random zips in one or more
  307.                                 condition lines:
  308.                                 LEFT(ZIP,5) is contained in "85718,85740"
  309.  
  310.           Field names pop up  - Makes it easy to locate the correct field
  311.           has sample data       name because the user can see a sample of
  312.           from user             the data.  Starting with version 2.10D, a
  313.           database.             field names pop up menu is available at the
  314.                                 touch of a key for every open work area.
  315.  
  316.           Self contained      - QQuery allows creating, listing, using,
  317.           system.               editing, renaming, deleting, and packing
  318.                                 queries, all from familiar Lotus 1-2-3
  319.                                 style menus.  Lotus and 1-2-3 are
  320.                                 registered trademarks of Lotus Development
  321.                                 Corporation.
  322.  
  323.           Context sensitive   - The user does not have to know about proper
  324.           auto-conversion of    syntax.  For example, if QQuery is
  325.           user expressions      expecting the user to enter a date
  326.           to correct syntax.    expression and the user just enters 1/1/89,
  327.                                 it will automatically be converted to
  328.                                 CTOD("1/1/89"), the correct syntax.  
  329.                               - QQuery searches the environment for field
  330.                                 names and variables to test each
  331.                                 constant/expression.  If the expression
  332.                                 tests ok, QQuery will accept it as entered. 
  333.                                 If the expression doesn't make sense,
  334.                                 QQuery will either put it in quotes, or
  335.                                 convert it with VAL or CTOD, depending on
  336.                                 whether a character, numeric, or date
  337.                                 expression is expected.
  338.  
  339.           Permits queries     - Point to field names of files in other work
  340.           into other work       areas in pop up menus whenever these fields
  341.           areas to related      in a related file are important to the
  342.           files.                query.  For example, to find all the
  343.                                 "Orders of $10,000 or more to Ohio
  344.                                 customers":
  345.                                 AMOUNT is after or matches 10000 .AND.
  346.                                 customer->STATE matches "OH"
  347.  
  348.  
  349.           08/01/91                Q Q U E R Y (tm)                   Page 4
  350.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  351.  
  352.                                - CAUTION: MULTI-USER -
  353.  
  354.           QQuery has never been tested in a multi-user environment.  There
  355.           are no LOAD, CALL, or RUN commands in QQuery to worry about. 
  356.           Nonetheless, no attempt was made to manage collisions that might
  357.           occur in a multi-user setting.  If you would like to see a multi-
  358.           user version of QQuery developed, please contact the author.  In
  359.           the meantime, please treat QQuery as you would any program that
  360.           has only been tested in a single user environment.
  361.  
  362.                        - ONE OPEN DATA FILE WORK AREA NEEDED -
  363.  
  364.           QQuery needs only one open work area and will find ANY unused
  365.           work area to USE for files it manages.  If all work areas are in
  366.           USE when the program is called, QQuery will advise you that such
  367.           is the case and return without executing.
  368.  
  369.  
  370.                             - QQUERY FILE DESCRIPTIONS -
  371.  
  372.           One of the following files is needed to run QQuery:
  373.  
  374.           FILENAME    STRUCTURE  CONTENTS
  375.           ----------  --------- ------------------------------------------ 
  376.           QQUERY.FOX     FOX    FoxBASE+ 2.10 compiled procedure file , OR
  377.           QQUERY.FXP     FXP    FoxPro 1.02 compiled procedure file, OR
  378.           QQUERY.APP     APP    FoxPro 2.0 compiled application file
  379.  
  380.           The following files are created by QQuery if they are not present
  381.           in the environment:
  382.  
  383.           FILENAME    STRUCTURE  CONTENTS
  384.           ----------  --------- ------------------------------------------ 
  385.           QQUERY.QST     DBF    Empty database structure used to make new
  386.                                 alias.QDB's
  387.           QQUERY.QSM     MEM    Memory variables for screen colors and 
  388.                                 feature options
  389.            alias.QDB     DBF    Database of queries for user data file
  390.                                 named <alias> 
  391.            alias.QDX     IDX    Index for above, key field is QDNAME 
  392.            alias.QDM     MEM    An image of the alias structures of all
  393.                                 open files with sample data
  394.           ??????         DBF    Occasionally a FOX generated unique
  395.                                 filename is used and subsequently erased,
  396.                                 function SYS(3).
  397.  
  398.           The 3 alias files are not actually named "alias".  "alias" is
  399.           used above to indicate that the left hand portion of the filename
  400.           is derived from the alias of your data file that has been USEd in
  401.           the current work area.
  402.  
  403.           08/01/91                Q Q U E R Y (tm)                   Page 5
  404.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  405.  
  406.                              - QQUERY FILES (continued) -
  407.  
  408.           The extension names QST, QSM, QDB, QDX, and QDM were chosen so
  409.           that QQuery would not conflict with your existing file names and
  410.           so you could identify the function of each QQuery file by name.
  411.  
  412.                         - HOW QQUERY CREATES AND USES FILES -
  413.  
  414.           Each time QQuery is started, it looks to see if a data file is in
  415.           USE in the currently selected work area.  If not, it presents a
  416.           directory of DBF files in the current directory and prompts you
  417.           to enter the name of one.  If none is entered, QQuery returns
  418.           without executing further.
  419.  
  420.           Once QQuery is given a file in the current work area, it checks
  421.           the current directory for a filename consisting of the alias as
  422.           the left hand part of the file name and QDB as the right hand
  423.           filename extension.
  424.  
  425.           For example, if ORDERS is the alias of the data file in the
  426.           current directory, QQuery will search for a file named
  427.           ORDERS.QDB.  If QQuery can't find the QDB file, it will create
  428.           one by copying the structure of the file QQUERY.QST to
  429.           ORDERS.QDB.  (If QQUERY.QST is not found in the current directory
  430.           or path, QQuery will create a new QQUERY.QST in the current
  431.           directory.)  The single ORDERS.QDB file can store hundreds of
  432.           queries to ORDERS and to any related files in unselected open
  433.           work areas.
  434.  
  435.                   - QDB & QDX FILES: QUERY DATA FILES AND INDEXES -
  436.  
  437.           In this example where ORDERS is the current work area alias,
  438.           QQuery requires two other files.  ORDERS.QDX is the index file
  439.           for ORDERS.QDB.  If the index file is not present, QQuery will
  440.           create one.
  441.  
  442.           alias.QDB Fields:
  443.           ----------------- 
  444.           QDNAME      C   8     The query name (and index key)
  445.  
  446.           QDESCRIPT   C  55     The plain language description of the query
  447.                                 (use for report headings)
  448.  
  449.           QDLEDIT     D   8     The last date edited (from the system date)
  450.  
  451.           QDCODE      C 254     The coded condition used by the query
  452.                                 editor 
  453.  
  454.           QDQUERY     C 240     The database language condition translated
  455.                                 from the code
  456.  
  457.           08/01/91                Q Q U E R Y (tm)                   Page 6
  458.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  459.  
  460.                        - QDM FILES: FIELD NAME POP UP MENUS -
  461.  
  462.           The third file in this example is ORDERS.QDM.  This memory file
  463.           is used for the pop up menus of field names and sample data from
  464.           the ORDERS data file.  
  465.  
  466.           Starting with version 2.10D of QQuery, field names and sample
  467.           data from every other work area that was in use when the QDM file
  468.           was created are also stored in this file.  QDM files are always
  469.           automatically created whenever there is no QDM in the current
  470.           directory or in a PATH that has the same name as the alias of the
  471.           data file currently selected.
  472.  
  473.           For example, if you have a data file alias ORDERS in use in the
  474.           current work area and are starting QQuery for the first time with
  475.           ORDERS, QQuery will create a memory file named ORDERS.QDM
  476.           containing a list of all the field specifications of ORDERS
  477.           (except memo fields) together with a portion of the data that is
  478.           in the current ORDERS record when you start QQuery.)  
  479.  
  480.           NOTE: To save disk space, when you have a group of several files
  481.           open in various work areas, make sure you select the master file
  482.           for that group every time before starting QQuery.  That way, only
  483.           one QDM file will ever be used for that group of files.
  484.  
  485.                    - MULTIPLE WORK AREA FIELD NAME POP UP MENUS -
  486.  
  487.           Starting with version 2.10D of QQuery, whenever you see the field
  488.           names pop up menu for the main file, you can also see additional
  489.           field name pop ups for all other work areas that were open when
  490.           the QDM file was created by using the left and right arrow keys.
  491.  
  492.           This feature of multiple work area field name pop up menus is
  493.           enabled in QQuery by having "/FLDPOP" in the QQSCOPTION variable
  494.           in the QQUERY.QSM system file.  This is the default when you
  495.           install version 2.10D.  The only reason not to enable this
  496.           feature is if you run out of memory and you don't want to
  497.           increase MVARSIZ in the CONFIG.FX or CONFIG.FP file.  The extra
  498.           pop-up lists require on average 45 bytes per field name.
  499.  
  500.           QDM files created by earlier versions of QQuery are completely
  501.           compatible with version 2.10D.  In fact, if you use your existing
  502.           QQUERY.QSM file that has QQSCOPTION="" with version 2.10D, QQuery
  503.           will generate a field name pop up for the main file only, just as
  504.           it did in earlier versions.  If you wish to add the other work
  505.           area pop up menus to an application that already has one or more
  506.           QDM files, first install version 2.10D of QQuery.  Delete the
  507.           existing QDM file.  Open up all the related files in all the work
  508.           areas you need and open the main file.  Start QQuery.  A new
  509.           <alias>.QDM with all the work area field names and sample data
  510.           will be created automatically.
  511.           08/01/91                Q Q U E R Y (tm)                   Page 7
  512.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  513.  
  514.           QQSCOPTION is a variable in the QQuery system memory file
  515.           QQUERY.QSM.  To enable field pop up menus for all open work
  516.           areas, have the QQSCOPTION variable include the string "/FLDPOP"
  517.           (quotes not needed).  That is the default when you install
  518.           version 2.10D.  To modify any existing QQUERY.QSM file:
  519.  
  520.                              RESTORE FROM qquery.qsm
  521.                              qqscoption = '/FLDPOP'
  522.                              SAVE TO qquery.qsm
  523.  
  524.           To save memory, if you do NOT want QQuery to create multiple work
  525.           area pop ups QDM files, substitute:    qqscoption = ''
  526.  
  527.  
  528.                   - EXCLUDING FILES FROM FIELD NAMES POP UP MENUS -
  529.  
  530.           You may not want to see field name pop ups for ALL the open work
  531.           areas, such as HELP and ERROR files.  QQSCOPTION can contain a
  532.           list of file aliases to exclude from the fields pop up menus. For
  533.           example, to include all files from all work areas EXCEPT a help
  534.           file and an error file, assuming the alias of each is HELP and
  535.           ERROR respectively, simply list the alias names separated by
  536.           commas after the /FLDPOP string in the QQSCOPTION variable:
  537.  
  538.                             qqscoption = '/FLDPOP:HELP,ERROR*'
  539.  
  540.           Don't forget the colon (:) after /FLDPOP and the asterisk (*)
  541.           after the last file name.  If you leave out the colon and the
  542.           asterisk, any listed files will NOT be excluded.
  543.  
  544.           If you want to change the Samples or if you change the Structure
  545.           of this data file, erase the file that begins with your data file
  546.           name and ends with the extension .QDM.  Then, the next time you
  547.           start QQuery, have your data files positioned at records that you
  548.           want to use for the pop up sample data.  Start QQuery and it will
  549.           create new field names pop up menus.  You may also use QQDMEDIT
  550.           described on the next page to modify existing QDM files.
  551.  
  552.           If you change field names or delete fields altogether, you will
  553.           have to adjust any query condition that uses the old field name. 
  554.           Each time you select a query from the LIST function, QQuery makes
  555.           a quick check to see if that all field names and variables in the
  556.           condition can still be found in the environment.  If not, you
  557.           will be offered the choice of editing the query to correct it or
  558.           going back to the top menu.  QQuery will not permit you to USE a
  559.           query that contains invalid statements.
  560.  
  561.  
  562.           08/01/91                Q Q U E R Y (tm)                   Page 8
  563.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  564.  
  565.                          - CUSTOM FIELD NAMES POP UP MENUS -
  566.  
  567.  
  568.           QQDMEDIT.PRG is a free utility program provided that lets you
  569.           customize existing field names pop up menus (QDM files):
  570.  
  571.             *    Modify the default field names pop up menu title.
  572.  
  573.             *    Change the content of any field name line.  Some users are
  574.                  replacing sample data with field descriptions.
  575.  
  576.             *    Add new lines.
  577.  
  578.             *    Delete existing lines.
  579.  
  580.             *    Add new children files and fields.
  581.  
  582.           Print the QQDMEDIT.PRG file for details, the following is an
  583.           overview.  
  584.  
  585.           Anytime after QQuery creates a QDM file, you make change it by
  586.           entering:
  587.  
  588.                                  DO QQDMEDIT
  589.  
  590.           at either the FoxBASE+ dot prompt or in the FoxPro command
  591.           window.  
  592.  
  593.           You will see a list of any existing QDM files in the current
  594.           directory.  Enter the name of the QDM file you want to modify. 
  595.           The QDM file will be automatically converted to a text file and
  596.           presented to you for full screen editing using the built in
  597.           FoxBASE+ or FoxPro editor.  
  598.  
  599.           After making changes, save the changes with the Ctrl-W key or
  600.           abandon any changes with the Escape key.  The field names
  601.           information will be automatically converted back to QDM format,
  602.           ready to use with QQuery.
  603.  
  604.  
  605.           08/01/91                Q Q U E R Y (tm)                   Page 9
  606.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  607.  
  608.                                - MEMORY REQUIREMENTS -
  609.  
  610.           Use the information in this section only if you are getting the
  611.           Fox error message number 21:
  612.  
  613.                        "String memory variable area overflow"
  614.  
  615.           when you run QQuery with your biggest combination of data files.
  616.  
  617.           QQuery uses lots of memory variable space for pop up menus.  As a
  618.           result, you may run out of room in memory when running QQuery
  619.           with the Fox default memory variable size of 6,000 bytes.
  620.  
  621.           QQuery and Fox could start to run out of memory if you have many
  622.           field name pop up menus with many fields, all available at once. 
  623.           Each menu item varies in memory requirement depending on the
  624.           field type and contents.  In practice, I have measured an average
  625.           of 45 bytes per field name pop up item.  To allow a margin for
  626.           error, use 50 bytes per menu item.
  627.  
  628.           Fox uses an item named MVARSIZ in a CONFIG file to permit you to
  629.           increase the amount of memory allocted to variables.  (CONFIG.FX
  630.           for FoxBASE+, CONFIG.FP for Foxpro).  
  631.  
  632.           If you get the "String memory variable area overflow" error
  633.           message, try increasing MVARSIZ in the CONFIG file by 50 bytes
  634.           for each field over 25 plus whatever you need in any program that
  635.           calls QQuery.  For example, if your related data files have
  636.           between them 145 fields, increase memory by (145-25)*50=6000
  637.           bytes.
  638.  
  639.           If you need to change the memory allocation, see the INSTALLATION
  640.           section at the end of this document about changing the CONFIG
  641.           file.  You will want to be sure it contains:
  642.  
  643.                                 MVARSIZ=n
  644.  
  645.           where n is any number greater than the Fox default of 6.  Each
  646.           increment represents 1,000 bytes, so MVARSIZ=12 would give you
  647.           12,000 bytes for memory variables.
  648.  
  649.  
  650.           08/01/91                Q Q U E R Y (tm)                  Page 10
  651.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  652.  
  653.                             - QQUERY MEMORY VARIABLES - 
  654.  
  655.           QQuery does NOT require the use of PARAMETERS.  This was done so
  656.           that QQuery would be easy to use from the command level.  The
  657.           following memory variables are PUBLIC on return from QQuery:
  658.  
  659.             qqname       C      The query nickname, trimmed
  660.             qqdesc       C      The user description, trimmed 
  661.             qquery       C      up to 240 characters for the condition used
  662.                                 by calling program for subsequent SET
  663.                                 FILTER TO, FOR, or WHILE phrases, trimmed
  664.  
  665.           These strings will return as nuls if the user QUITs so that any
  666.           program you DO QQuery from can take appropriate action. If you
  667.           are a developer with a few lines of code you can spare, you might
  668.           try these lines in your programs after DO QQUERY
  669.  
  670.           To combine the name and description for reports:
  671.  
  672.              qqdesc = qqname + ' - ' + qqdesc
  673.  
  674.           To test for long conditions:
  675.  
  676.              IF LEN(qquery) > 210        && between 210 and 240, BIG
  677.                 COPY TO x FOR &qquery
  678.                 USE x ALIAS <your data file name> 
  679.              ENDIF 
  680.              ... do report expecting an ALIAS of <your data file name> 
  681.              USE 
  682.              ERASE x.dbf
  683.  
  684.           If the condition is 240 characters, the COPY TO x FOR &qquery
  685.           command will expand to the maximum 254 characters allowed in a
  686.           FoxBASE+ command line.  (NOTE: FoxPro increased the limit to 1024
  687.           characters per command line)
  688.  
  689.           SET FILTER TO has a limit of 160 characters.  That doesn't mean
  690.           that queries need be limited to that length.  A command that
  691.           combines sorting and filtering in one step is:
  692.  
  693.              INDEX ON <your sorting expression> TO <filename> FOR &QQUERY
  694.  
  695.           Make sure you test the LENgth of the QQUERY memory variable
  696.           before issuing commands in your programs.  Remember the limit of
  697.           characters in any command line means AFTER macro expansion.  If
  698.           the condition is too big for one method, you can always resort to
  699.           copying to a temporary file as in the above IF ENDIF example.
  700.  
  701.           08/01/91                Q Q U E R Y (tm)                  Page 11
  702.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  703.  
  704.                              - CHANGING SCREEN COLORS -
  705.  
  706.           There is a wide range of color monitors out in the world, and
  707.           what is bright yellow on one monitor is dark brown on another. 
  708.           This section is about changing screen colors from the default
  709.           values of QQuery to something more to your liking.
  710.  
  711.           QQuery will create a memory file QQUERY.QSM if it is not present
  712.           in the environment with the following default values for screen
  713.           colors.
  714.  
  715.           QQUERY.QSM DEFAULT SCREEN COLOR MEMORY VARIABLES:
  716.  
  717.            Mono  normal               . qqscrnnrml = "W/N,N/W,N"
  718.                  editor fields        . qqscrnbold = "W+/N"
  719.                  blinking messages    . qqscrnblnk = "W+*/N"
  720.                  help border          . qqscrnhlpb = "N/W"
  721.                  help text            . qqscrnhlpt = "W/N"
  722.            Color normal               . qqscolnrml = "W+/B,W+/BG,B"
  723.                  editor fields        . qqscolbold = "GR+/B"
  724.                  blinking messages    . qqscolblnk = "W+*/B"
  725.                  help border          . qqscolhlpb = "B/W"
  726.                  help text            . qqscolhlpt = "W+/BG"
  727.            Options                    . qqscoption = "/FLDPOP"      
  728.                                         
  729.           Whenever QQuery is started with this file present, QQuery will
  730.           use the values for screen colors that are in the file.  This
  731.           means you can substitute different values for screen colors and
  732.           QQuery will use them.  See the FIELD NAMES POP UP MENUS section
  733.           of this documentation for info about the QQSCOPTION variable.
  734.  
  735.           On a color monitor, the default color for normal display in
  736.           QQuery is determined by the variable QQSCOLNRML, which by default
  737.           is:
  738.  
  739.           "          W+/B           ,        W+/BG          ,        B    "
  740.  
  741.           (Normal: white+ on blue, Gets: white+ on cyan,  Border: blue)
  742.  
  743.           The abbreviations for all the colors are listed under the SET
  744.           COLOR TO command in your database manual of Commands and
  745.           Functions.
  746.  
  747.  
  748.           08/01/91                Q Q U E R Y (tm)                  Page 12
  749.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  750.  
  751.                        - CHANGING SCREEN COLORS (continued) -
  752.  
  753.           If you want to change any of the colors in QQUERY, you need to
  754.           change the contents of QQUERY.QSM.  At the FoxBASE+ dot prompt or
  755.           in the FoxPro command window, enter:
  756.  
  757.                   RESTORE FROM qquery.qsm 
  758.                   DISPLAY MEMORY
  759.  
  760.           At this point you should see a list including the following:
  761.  
  762.                   qqscrnnrml  Pub   C  "W/N,N/W,N"
  763.                   qqscrnbold  Pub   C  "W+/N"
  764.                   qqscrnblnk  Pub   C  "W+*/N"
  765.                   qqscrnhlpb  Pub   C  "N/W"
  766.                   qqscrnhlpt  Pub   C  "W/N"
  767.                   qqscolnrml  Pub   C  "W+/B,W+/BG,B"
  768.                   qqscolbold  Pub   C  "GR+/B"
  769.                   qqscolblnk  Pub   C  "W+*/B"
  770.                   qqscolhlpb  Pub   C  "B/W"
  771.                   qqscolhlpt  Pub   C  "W+/BG"
  772.                   qqscoption  Pub   C  "/FLDPOP"      
  773.                   
  774.           Then, to change to:       Normal text: blue on cyan, 
  775.                                        Enhanced: black on white,           
  776.                                          Border: cyan
  777.  
  778.                        Enter:
  779.  
  780.                   qqscolnrml = 'B/BG,N/W,BG'
  781.  
  782.           Finally, save your changes to disk.
  783.  
  784.                   SAVE TO qquery.qsm
  785.  
  786.           By the way, if your new colors get way out of hand and you want
  787.           to start over, just erase the QQUERY.QSM file from the disk. 
  788.           QQuery will create a new QQUERY.QSM with the default colors the
  789.           next time you start QQuery.
  790.  
  791.  
  792.           08/01/91                Q Q U E R Y (tm)                  Page 13
  793.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  794.  
  795.                                  - PROCEDURE FILES -
  796.  
  797.           FoxPro does not require QQuery to SET PROCEDURE TO and therefore
  798.           nothing special is required to invoke QQuery from any
  799.           application, simply include "DO qquery" in your application. 
  800.           However, when running QQuery with FoxBASE+, please read this page
  801.           to see if the information applies to your situation:
  802.  
  803.  
  804.           QQuery is a PROCEDURE file consisting of over 20 procedures 
  805.           compiled encrypted by FOXPCOMP.  QQuery is useful at the dot
  806.           prompt.  However, the intended use of QQuery is as a subroutine
  807.           in the reporting sections of large database application procedure
  808.           files.
  809.  
  810.           For example, in the middle of a reporting program, you will DO
  811.           QQuery after choosing the report needed and before running it. 
  812.           You can do that with QQuery, even if the calling program is a
  813.           procedure in an open procedure file.  However, QQUERY NEEDS YOU
  814.           TO SUPPLY IT WITH THE NAME OF THE PROCEDURE FILE THAT CALLS
  815.           QQUERY.  If you do not, QQuery will not re-open your procedure
  816.           file when it is ready to return and your program will stop.
  817.  
  818.           So, before you call QQuery, create a memory variable QCALLER with
  819.           the name of the procedure file that will be calling QQuery. 
  820.           Please note that the FoxBASE+ SYS(16) function returns the name
  821.           of the current program or module, not necessarily the name of the
  822.           procedure file containing the program or module.  
  823.  
  824.           As an example, if you have a procedure file named MAIN.PRG that
  825.           will be DOing QQuery, the following is recommended at the
  826.           beginning of the procedure file MAIN.PRG:
  827.  
  828.                  SET PROCEDURE TO main
  829.                  qcaller = 'main'
  830.                  DO ......         && the name of your top procedure
  831.                  PROCEDURE ......  && the name of your first procedure
  832.  
  833.  
  834.           And please remember, if you are using FoxPro, none of these extra
  835.           steps are needed!
  836.  
  837.           08/01/91                Q Q U E R Y (tm)                  Page 14
  838.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  839.  
  840.                                 - READ ONLY ACCESS -
  841.  
  842.           For quality control reasons, you may want one user to create and
  843.           modify all queries using QQuery and all other users to have "READ
  844.           ONLY" access to the query files for generating reports.  Source
  845.           code for a program for query read only, QQREAD.PRG, is included
  846.           on the QQuery distribution diskette, ready for you to customize.
  847.  
  848.           To enhance QQREAD.PRG, use your own error trapping routines to
  849.           provide tests for the existence of file <alias>.QDB, index file
  850.           <alias>.QDX, that there is at least 1 undeleted record in the
  851.           file, and that there is at least one unused work area available. 
  852.           Have the <alias> user data file (not the query data file) open in
  853.           the currently selected work area, and be sure that DELETED is SET
  854.           ON.  You may also wish to add Help screens.
  855.  
  856.           QQREAD.PRG is small enough to be bound with your other programs
  857.           in your main procedure file.
  858.  
  859.  
  860.           NOTES:
  861.  
  862.           08/01/91                Q Q U E R Y (tm)                  Page 15
  863.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  864.  
  865.                        - NOTICE REGARDING QQUERY SOURCE CODE -
  866.  
  867.           QQuery is a copyrighted work by Carlos Berguido.  When you
  868.           register you are granted the right to modify the QQuery source
  869.           code to optimize QQuery for your applications.
  870.  
  871.           As a registered user, you may choose to modify the source code to
  872.           eliminate display on the screen of the copyright notice and/or
  873.           the registration notice in applications you develop that use
  874.           QQuery.  You are granted that right as a registered user. 
  875.           However, you are NOT granted the right to delete either notice
  876.           from the source code.  You may write around the notices or
  877.           comment them out so that they do not display but you may not
  878.           erase either notice from the source code.
  879.  
  880.           Any copies of QQuery source code that you provide with your
  881.           applications must contain the QQNOTICE.PRG module, and the
  882.           copyright notice in the QQSTART.PRG module without any
  883.           alterations to the content of any notice.  Failure to provide
  884.           these notices with the source code is a violation of the author's
  885.           copyright.  Thank-you for your cooperation.
  886.  
  887.           ANY USE OF QQUERY OTHER THAN FROM WITHIN THE APPLICATION PROGRAMS
  888.           OF REGISTERED USERS REQUIRES REGISTRATION.
  889.  
  890.  
  891.  
  892.           08/01/91                Q Q U E R Y (tm)                  Page 16
  893.               (c) 1989,1991 by Carlos Berguido - Vers 2.10E INFORMATION
  894.  
  895.                                   - INSTALLATION -
  896.  
  897.           These instructions assume that if you received QQuery in a one
  898.           compressed "ZIP" file, that you have extracted the QQuery files
  899.           onto a floppy diskette.  Please choose one of these options:
  900.  
  901.           OPTION 1 - QQuery and your data files in the same directory:
  902.  
  903.           Insert the QQuery diskette in drive A.  In this option, the
  904.           QQuery program and all supporting files are installed in the same
  905.           directory as your data files.  If, for example, you keep your
  906.           data in a subdirectory C:\FOX\MYDATA, get to DOS and enter:
  907.                                      C:
  908.                                      CD \FOX\MYDATA
  909.                                      A:INSTALL
  910.  
  911.           The QQuery system and demo files will be copied into your data
  912.           directory.  When you are at the place to enter Fox commands
  913.           working with your data files, you can start QQuery by entering
  914.           either:
  915.                                      DO QQUERY      && QQuery directly
  916.                                      DO QQDEMO      && The demonstration
  917.  
  918.           OPTION 2 - Run QQuery from any directory by using PATH:
  919.  
  920.           If you have more than one data subdirectory, and you want to run
  921.           QQuery with the data in any of them, you can repeat the
  922.           installation described above for each directory.  However, if you
  923.           would like to save disk space and make it easier to upgrade
  924.           QQuery, you should install QQuery in only one place.  In this
  925.           example, QQuery will be installed in a subdirectory below the
  926.           standard Fox subdirectory (change \FOX to \FOXPRO below if that
  927.           is where you keep FoxPro):
  928.                                      C:
  929.                                      MD \FOX\QQUERY
  930.                                      CD \FOX\QQUERY
  931.                                      A:INSTALL
  932.  
  933.           A subdirectory C:\FOX\QQUERY will be created on your hard disk
  934.           and the QQuery files will be copied into it.  Now, each time you
  935.           start Fox, Fox needs to know where QQuery exists on your hard
  936.           disk.  Use MODIFY COMMAND or any text editor to create or modify
  937.           the \FOX\CONFIG.FX (FoxPro uses CONFIG.FP) file and add the line:
  938.  
  939.                                      PATH = C:\FOX\QQUERY
  940.  
  941.           However, if there is already a PATH statement, just add
  942.           ;C:\FOX\QQUERY to the end of the existing PATH statement.  See
  943.           "Fine Tuning" and the SET PATH TO command in the Fox User Guide
  944.           for more information.  After doing that, restart Fox.  To use
  945.           QQuery, enter either DO QQDEMO or DO QQUERY or use DO QQUERY in
  946.           your application programs.
  947.